'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller, middleware } = app;
  const { auth } = middleware;
  // banner
  router.get('/api/banner/list', controller.wx.bannerList);
  // 获取banner详情
    router.get('/api/banner/detail', controller.wx.bannerDetail);
    // company
    router.get('/api/company/list', controller.wx.companyList);
    // storeRecord
    router.get('/api/storeRecord/list', controller.wx.storeRecordList);
    // feedType
    router.get('/api/mat/list', controller.wx.matList);
    // 饲料平均价格（前六个月）
    router.get('/api/matin/avgPrice', controller.wx.matinAvgPrice);
    // 牛宿
    router.get('/api/room/list', controller.wx.roomList);
    // 牛舍设备
    router.get('/api/device/list', controller.wx.deviceList);
    // 设备故障记录
    router.get('/api/deviceFaults/list', controller.wx.deviceFaultsList);
    // 摄像头
    router.get('/api/camera/list', controller.wx.cameraList);
    // 品种牛分组
    router.get('/api/beefGroup/list', controller.wx.beefGroupList);
    // 牛进出栏
    router.get('/api/beefInOut/list', controller.wx.beefInOutList);

    // 告警清单
    router.get('/api/alarm/list', controller.wx.alarmList);
    // 处理告警
    router.post('/api/alarm/handle', controller.wx.handleAlarm);
    // 删除告警
    router.post('/api/alarm/delete', controller.wx.deleteAlarm);
    // 统计今日考勤
    router.get('/api/workLog/today', controller.wx.workLogToday);
    // 年龄分布
    router.get('/api/staff/ageDistribution', controller.wx.ageDistribution);
    // 登录
    router.post('/api/user/login', controller.wx.login);
    // 生产计划
    router.get('/api/plan/list', controller.wx.planList);
    // 繁育指标数据
    router.get('/api/breed/index', controller.wx.breedIndex);
    // 疾病统计
    router.get('/api/disease/list', controller.wx.diseaseList);
};
